﻿<!doctype html>
<html>
<head>
<#include "/part_meta.ftl">
<title>商品列表-迈小众</title>
<link href="${st.resDomain}/css/style.css" rel="stylesheet">
<link href="${st.resDomain}/css/form-base.css" rel="stylesheet">
<link href="${st.resDomain}/css/MC-base.css" rel="stylesheet">
<link href="${st.resDomain}/css/MC.css" rel="stylesheet">
<style>
.label {
    display: inline-block;
    padding: 0.2em 0.6em 0.3em;
    font-weight: 700;
    line-height: 1;
    color: #FFF;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: 0.25em;
}
.label-success {
    background-color: #5CB85C;
}
.label-default {
    background-color: #D0D0D0;
}
</style>
</head>

<body>
<!--- header --->
<div id="header">
  <div class="main f_clear">
  	<div class="logo"><h2><@shiro.principal property="s_name" /></h2><span>您好！<@shiro.principal property="m_name" />， <a href="${st.domain}/member/logoutDo">退出</a>&nbsp;&nbsp;&nbsp;[ <a href="${st.shopDomain}/localSale/v1.1" target="_blank">进行线下销售</a> ]</span></div>
    <div class="f_right"><a href="${st.userDomain}">个人中心</a> <a href="${st.shopDomain}" class="selected">店铺管理</a><@shiro.hasRole name="FIRM"><a href="${st.firmDomain}">企业管理</a></@shiro.hasRole></div>
  </div>
</div>
<!--- header end--->
<!--topnav -->
<div id="topnav">
  <div class="main">
    <ul class="left">      
      
      <li><a href="${st.shopDomain}/order/list?statuses=0">订单</a></li>
      <li class="selected"><a href="${st.shopDomain}/storeGoods/list">商品</a></li>
      <li><a href="${st.shopDomain}/memberVip">会员</a></li>      
      <li><a href="${st.shopDomain}/store/edit">店铺</a></li>      
      <li><a href="${st.shopDomain}/goodsReport">数据</a></li>
    </ul>
  </div>
</div>
<!--topnav end-->
<div id="main" class="f_clear">
  <div id="left">
    <ul id="menu1">
      <li class="selected"><a href="${st.shopDomain}/storeGoods/list">店铺商品</a></li>
      <li><a href="${st.shopDomain}/store/onlineSetting">线上销售</a></li>
      <li style="margin-left:10px;"><a href="${st.shopDomain}/goodsPromote/list?id.type=0">商品促销</a></li>
      <li style="margin-left:10px;"><a href="${st.shopDomain}/storePromote/list?type=0">满额促销</a></li>
      <li><a href="${st.shopDomain}/store/localSetting">线下销售</a></li>
      <li style="margin-left:10px;"><a href="${st.shopDomain}/goodsPromote/list?id.type=2">商品促销</a></li>
      <li style="margin-left:10px;"><a href="${st.shopDomain}/storePromote/list?type=2">满额促销</a></li>
      
      <li style="margin-left:10px;"><a href="${st.shopDomain}/localSale/soft">离线版本</a></li>
      <li><a href="${st.shopDomain}/storeRestock/list?isChecked=0">进货管理</a></li>
      <li><a href="${st.shopDomain}/storeGoods/add">商品入库</a></li>
    </ul>
  </div>
  <div id="right">
    <div id="title">商品管理 - 商品列表</div>
    <div id="search">
     <div id="hideData" style="display:none">${companyId}</div>
    <form id="search_form" onsubmit="return $(this).showMsg('正在查询...', 'load', true);">
      <div class="left">
      	<span id="selectClassify"></span>
        <input type="hidden" id="classifyId" name="goodsClassify.classifyId" value="${storeGoods.goodsClassify.classifyId}">
        <select name="status" data="${storeGoods.status}" class="k">
          <option value="">-上架状态-</option>
          <#list statuses as status>
           <option value="${status.value}">${status.text}</option>
          </#list>
        </select>
        <select name="stock" data="${storeGoods.stock}" class="k">
          <option value="">-库存-</option>
          <option value="0">缺货</option>
        </select>
        <select class="k" id="gp_select">
          <option value="">-促销类型-</option>
          <option value="atDiscount">打折</option>
          <option value="atGift">随赠</option>
          <option value="oAg">打折和随赠</option>
        </select>
        <input type="hidden" id="atDiscount" name="atDiscount" value="${storeGoods.atDiscount}"/>
        <input type="hidden" id="atGift" name="atGift" value="${storeGoods.atGift}"/>
        <input name="searchWord" type="text" value="${searchWord}" placeholder="商品名/商品编码" autofocus="autofocus" class="k"/>
        <input type="submit" class="feignhide"><!-- 实现回车提交 -->
        <a onclick="$('#search_form').submit();" class="btn3">查询</a></div>
     </form>
    </div>
    <table width="100%" border="0" cellspacing="0" cellpadding="0" class="tab" id="spgl">
      <tr id="listHead">
        <th class="w1"><input name="selectAll" type="checkbox" checked/></th>
        <th class="w2">商品名称</th>
        <th class="w3">&nbsp;</th>
        <th colspan="2">价格(￥)</th>
        <th colspan="2">库存</th>
        <th width=60>上架状态</th>
        <th width=110>促销状态</th>
        <th class="cz">操作</th>
      </tr>
      <#list list as sg>
       <tr id="item_${sg.storeGoodsId}">
        <td class="w1"><input name="storeGoodsIds" type="checkbox" value="${sg.storeGoodsId}" checked/></td>
        <td class="w2"><a href="${st.shopDomain}/storeGoods/edit?storeGoodsId=${sg.storeGoodsId}"><img src="${st.resDomain}/images/goods_def.jpg" <#if sg.pic??>data="${sg.pic}" </#if>/></a></td>
        <td class="w3"><span>${sg.barCode}</span><br><a href="${st.shopDomain}/storeGoods/edit?storeGoodsId=${sg.storeGoodsId}">${sg.name}</a></td>
        <td class="price"><span class="w6">${sg.price}</span></td>
        <td class="unit">/${sg.unit}</td>
        <td class="price"><#if sg.stock == 0><span style="color:red">${sg.stock}</span><#else>${sg.stock}</#if></td>
        <td class="unit">
        	${sg.unit}
        	<#if sg.sellUnit??>
        	(
        	<form onsubmit="$('#sgStockInput_${sg.storeGoodsId}').blur();return false;" style="display: inline;">
        	<input type="text" id="sgStockInput_${sg.storeGoodsId}" value="${sg.stockConvert}" style="width:30px; display:none;"/>
         	<a id="sgStockA_${sg.storeGoodsId}">${sg.stockConvert}</a>
         	<input type="submit" class="feignhide"><!-- 实现回车提交 -->
         	</form>
        	${sg.sellUnit})
        	</#if>
        </td>
        <td>
         <a href="javascript:;" id="statusBt_${sg.storeGoodsId}_${sg.status}" class="zt-icon <#if sg.status == 1>sj<#else>xj</#if>" title="点击更改状态"></a>
        </td>
        <td>
         <div>线上:
         	<a href="${st.shopDomain}/goodsPromote/addOrEdit?storeGoodsId=${sg.storeGoodsId}&type=0"><span class="label label-<#if sg.atDiscount>success<#else>default</#if>">折</span></a>
         	<a href="${st.shopDomain}/goodsPromote/addOrEdit?storeGoodsId=${sg.storeGoodsId}&type=1"><span class="label label-<#if sg.atGift>success<#else>default</#if>">赠</span></a>
         </div>
       	 <div>线下:
         	<a href="${st.shopDomain}/goodsPromote/addOrEdit?storeGoodsId=${sg.storeGoodsId}&type=2"><span class="label label-<#if sg.atDiscountLocal>success<#else>default</#if>">折</span></a>
         	<a href="${st.shopDomain}/goodsPromote/addOrEdit?storeGoodsId=${sg.storeGoodsId}&type=3"><span class="label label-<#if sg.atGiftLocal>success<#else>default</#if>">赠</span></a>
         </div>
        </td>
        <td class="cz">
         <a href="javascript:;" id="sort_${sg.storeGoodsId}_1">置顶</a> | <a href="javascript:;" id="sort_${sg.storeGoodsId}_0">沉底</a>
        </td>
       </tr>
      </#list>
    </table>
    <div class="tabletj">
      <div class="left">
        <input name="selectAll" type="checkbox" checked/>
        <a id="onAllBt" class="btn3">上架</a>
        <a id="offAllBt" class="btn3">下架</a>
      </div>
      <div id="page">
        ${pl.linkString}
      </div>
    </div>
  </div>
</div>
<!--footer-->
<div id="footer">Copyright© 迈小众 <span style="padding-left:30px;">客服QQ：<a target="_blank" href="http://wpa.qq.com/msgrd?v=3&uin=3101084438&site=qq&menu=yes" rel="nofollow"><img border="0" src="http://wpa.qq.com/pa?p=2:3101084438:50" alt="点击联系我们，QQ：3101084438" title="点击联系我们，QQ：3101084438"></a></span></div>
<!--footer end-->
<script data-main="${st.resDomain}/scripts/shop/storeGoods_list" src="${st.resDomain}/scripts/require.js"></script>
</body>
</html>
